<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        *{padding: 0;margin: 0;}
        .content{
            display: flex;
            /* 设置主轴方向 */
            flex-direction: column;
            /* 控制子元素是否换行，默认不换行 */
            /* flex-wrap: wrap; */
            /* 控制主轴对齐方式 */
            justify-content: space-around;
            /* 交叉轴对齐方式 */
            align-items: center;

            width: 1200px;
            height: 500px;
            margin: 0 auto;
            background-color: #ccc;
        }
        .left,.right{
            width: 500px;
            height: 200px;
            border: 3px solid #f00;
        }
    </style>
</head>
<body>
    <div class="content">
        <div class="left">1</div>
        <div class="right">2</div>
    </div>

</body>
</html>